package com.oa.model;

import java.util.Set;

/**
 * 
 * @author jyan1
 * @hibernate.class table="organization"
 *
 */
public class Organization {
	
	private Long id;
	private String name;
	private String sn;
	private String description;
	private Organization parentO;
	private Set<Organization> childO;
	
	/**
	 * @hibernate.id 
	 * 		generator-class="native"
	 */
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @hibernate.property 
	 */
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @hibernate.property 
	 */
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	
	/**
	 * @hibernate.property 
	 */
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * @hibernate.many-to-one
	 * 		column="pid";
	 */
	public Organization getParentO() {
		return parentO;
	}
	public void setParentO(Organization parentO) {
		this.parentO = parentO;
	}
	
	/**
	 * @hibernate.set inverse="true"
	 * @hibernate.key column="pid";
	 * @hibernate.one-to-many 
	 * 		class="com.oa.model.Organization"
	 */
	public Set<Organization> getChildO() {
		return childO;
	}
	public void setChildO(Set<Organization> childO) {
		this.childO = childO;
	}
}
